{extend name="admin@public/base_content" /}
{block name="body"}
<body>
{include file="admin@public/common" /}
<div class="layui-form">
    <table class="layui-table lay-even">
        <thead>
        <tr>
            <th width="80">ID</th>
            <th>名称</th>
            <th>地址</th>
            <th width="240">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="list" item="vo"}
        <tr>
            <td>{$vo.id}</td>
            <td><input type="text" class="layui-input ajax-blur" name="field_value" value="{$vo.name}" data-params='{"url":"{:url("api/api/upField")}","data":"table=home_url&id_name=id&id_value={$vo.id}&field=name","loading":"false","complete":"up"}'> </td>
            <td><input type="text" class="layui-input ajax-blur" name="field_value" value="{$vo.url}" data-params='{"url":"{:url("api/api/upField")}","data":"table=home_url&id_name=id&id_value={$vo.id}&field=url","loading":"false","complete":"up"}'> </td>
            <td>
                <a href="{:url('info',array('id'=>$vo['id']))}" class="layui-btn layui-btn-mini modal-catch">
                    <i class="iconfont">&#xe653;</i>编辑
                </a>
                <a class="layui-btn layui-btn-mini layui-btn-danger ajax"
                   data-list='{"key":"id={$vo.id}","msg":true,"render":"true","action":"del"}'
                   data-params='{"url": "{:url("del")}","confirm":"true","data":"id={$vo.id}","complete":"del"}'>
                    <i class="iconfont">&#xe626;</i>删除
                </a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
</div>
<div class="text-right">
    <div class="layui-box layui-laypage layui-laypage-molv" id="layui-laypage-1">
        {$list->render()}
    </div>
</div>
</body>
{/block}
{block name="script"}
<script>
    layui.use('default');
</script>
{/block}